<?php
/* @var $this ClienteController */
/* @var $model Cliente */

$this->breadcrumbs=array(
	'Clientes'=>array('index'),
	$model->id,
);

$this->menu=array(
	array('label'=>'List Cliente', 'url'=>array('index')),
	array('label'=>'Create Cliente', 'url'=>array('create')),
	array('label'=>'Update Cliente', 'url'=>array('update', 'id'=>$model->id)),
	array('label'=>'Delete Cliente', 'url'=>'#', 'linkOptions'=>array('submit'=>array('delete','id'=>$model->id),'confirm'=>'Are you sure you want to delete this item?')),
	array('label'=>'Manage Cliente', 'url'=>array('admin')),
);
?>

<h1>View Cliente #<?php echo $model->id; ?></h1>

<?php $this->widget('zii.widgets.CDetailView', array(
	'data'=>$model,
	'attributes'=>array(
		array(
			'name' => 'razaoSocial',
			'value' => $model->razaoSocial,
			'visible' => $model->tipoPessoa == 'j' ? true : false
		),
		'nome_fantasia',
		array(
			'name' => 'tipoPessoa',
			'value' => $model->tipoPessoa == 'j' ? 'Jurídica' : 'Física'
		),
		'logo',
		array(
			'name' => $model->tipoPessoa == 'j' ? 'cnpj' : 'cpf',
			'value' => $model->cnpj
		),
		array(
			'name' => 'status',
			'value' => $model->status == 0 ? 'Inativo' : 'Ativo'
		),
		array(
			'name' => 'ie',
			'value' => $model->ie,
			'visible' => $model->tipoPessoa == 'j' ? true : false
		),
		array(
			'name' => 'im',
			'value' => $model->im,
			'visible' => $model->tipoPessoa == 'j' ? true : false
		),
		array(
			'name' => 'dataCadastro',
			'value' => date('d/m/Y H:i:s', strtotime($model->dataCadastro))
		)
	),
)); ?>
